<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			
			// Person p = new Person();
			
			//定义对象
			var person = {
				name:'张三',
				age : 18,
				sayHi: function(){
					console.log("大家好");
				}
			}
			person.address = "北京市西城区";
			console.log(person);
			console.log(person.name);
			console.log(person.age);
			console.log(person.address);
			person.sayHi();
			
			//使用Object定义对象
			//可以追加属性
			var person2 = new Object();
			person2.name = '李四';
			console.log(person2);
			console.log(person2.name);
			console.log(person2.age);
			
			
			
			
			
			
		</script>
	</head>
	<body>
	</body>
</html>
